#grid {
    width: 1600px;
    height: 600px;
    display: flex;
    flex-wrap: wrap;    
}

img {
    height: 340px;
    width: 400px;
}